{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}E:\workdata\704429\Projektfiles\overreporting\res/overreporting_log.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}20 Dec 2018, 13:47:20
{txt}
{com}. timer on 1
{txt}
{com}. * Load admin data and DNES 
. use foranalysis_deskriptiv_all.dta, clear
{txt}
{com}. merge 1:1 pnr using "E:\workdata\704429\Grunddatanewest\skemadata_a_ku2_ok.dta"
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}       4,670,992
{txt}{col 9}from master{col 30}{res}       4,670,949{txt}  (_merge==1)
{col 9}from using{col 30}{res}              43{txt}  (_merge==2)

{col 5}matched{col 30}{res}           4,104{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. **Recodings**
. recode IE 3=2
{txt}(IE_TYPE: 56910 changes made)

{com}. gen deltog=0
{txt}
{com}. replace deltog=1 if d1ny != .
{txt}(2,194 real changes made)

{com}. recode d1ny 98=. 2=0 1=100 // Remove missing from self reported turnout
{txt}(d1ny: 2194 changes made)

{com}. 
. ************************************************************************************************
. ************************************************************************************************
. **************************** Create weights ****************************************************
. ************************************************************************************************
. ************************************************************************************************
. 
. 
. gen pop_mod_sample = stemt != .
{txt}
{com}. gen sample_mod_sample = _m == 3 & stemt != .
{txt}
{com}. 
. gen alder_valg_three_pop = 0 
{txt}
{com}. replace alder_valg_three_pop = 1 if alder_ved_valg > 29
{txt}(3,866,753 real changes made)

{com}. replace alder_valg_three_pop = 2 if alder_ved_valg > 75
{txt}(659,654 real changes made)

{com}. 
. * tabulate age groups for population <76 and for sample
. 
. tab alder_valg_three_pop if alder_valg_three_pop < 2 & pop_mod_sample == 1

{txt}alder_valg_ {c |}
  three_pop {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}    604,261       21.50       21.50
{txt}          1 {c |}{res}  2,206,051       78.50      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}  2,810,312      100.00
{txt}
{com}. tab alder_valg_three_pop if sample_mod_sample == 1 & alder_valg_three_pop < 2

{txt}alder_valg_ {c |}
  three_pop {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}      1,152       36.64       36.64
{txt}          1 {c |}{res}      1,992       63.36      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      3,144      100.00
{txt}
{com}. 
. * use proportion <30 in survey vs population
. gen weights = . 
{txt}(4,675,096 missing values generated)

{com}. replace weights = 1 / (1152 / 604261) if alder_valg_three_pop == 0 
{txt}(808,343 real changes made)

{com}. replace weights = 1 / (1992 / 2206051) if alder_valg_three_pop == 1
{txt}(3,207,099 real changes made)

{com}. 
. tab alder_valg_three_pop [aweight = weights] if sample_mod_sample == 1 

{txt}alder_valg_ {c |}
  three_pop {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res} 676.009121       21.50       21.50
{txt}          1 {c |}{res} 2,467.9909       78.50      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      3,144      100.00
{txt}
{com}. 
. ** Table 1
. 
. tab stemt if alder_ved_valg < 76 // column 1

       {txt}Stemte ved FV15 {c |}      Freq.     Percent        Cum.
{hline 23}{c +}{hline 35}
           Stemte ikke {c |}{res}    381,128       13.56       13.56
{txt}                   100 {c |}{res}  2,429,184       86.44      100.00
{txt}{hline 23}{c +}{hline 35}
                 Total {c |}{res}  2,810,312      100.00
{txt}
{com}. tab stemt [aweight = weights] if _m == 3  // columnn 2

       {txt}Stemte ved FV15 {c |}      Freq.     Percent        Cum.
{hline 23}{c +}{hline 35}
           Stemte ikke {c |}{res} 433.618568       13.79       13.79
{txt}                   100 {c |}{res} 2,710.3814       86.21      100.00
{txt}{hline 23}{c +}{hline 35}
                 Total {c |}{res}      3,144      100.00
{txt}
{com}. bysort deltog: tab stemt [aweight = weights] if _m == 3 // columns 3 and 4

{txt}{hline}
-> deltog = 0

       Stemte ved FV15 {c |}      Freq.     Percent        Cum.
{hline 23}{c +}{hline 35}
           Stemte ikke {c |}{res} 333.715573       22.10       22.10
{txt}                   100 {c |}{res} 1,176.2844       77.90      100.00
{txt}{hline 23}{c +}{hline 35}
                 Total {c |}{res}      1,510      100.00

{txt}{hline}
-> deltog = 1

       Stemte ved FV15 {c |}      Freq.     Percent        Cum.
{hline 23}{c +}{hline 35}
           Stemte ikke {c |}{res}   108.7385        6.65        6.65
{txt}                   100 {c |}{res} 1,525.2615       93.35      100.00
{txt}{hline 23}{c +}{hline 35}
                 Total {c |}{res}      1,634      100.00

{txt}
{com}. tab d1ny [aweight = weights] if stemt != . // column 5

  {txt}Har stemt {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res} 62.3816228        3.85        3.85
{txt}        100 {c |}{res} 1,558.6184       96.15      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,621      100.00
{txt}
{com}. 
. ** descriptive stats
. 
. * recodings for descriptive stats
. 
. gen edu_elementary = hfaudd_h == 1 
{txt}
{com}. gen edu_highschool = hfaudd_h == 2 
{txt}
{com}. gen edu_vocational = hfaudd_h == 3
{txt}
{com}. gen edu_mid_short  = hfaudd_h == 4
{txt}
{com}. gen edu_long       = hfaudd_h == 5
{txt}
{com}. 
. replace edu_elementary = . if hfaudd_h == .
{txt}(362,781 real changes made, 362,781 to missing)

{com}. replace edu_highschool = . if hfaudd_h == .
{txt}(362,781 real changes made, 362,781 to missing)

{com}. replace edu_vocational = . if hfaudd_h == .
{txt}(362,781 real changes made, 362,781 to missing)

{com}. replace edu_mid_short  = . if hfaudd_h == .
{txt}(362,781 real changes made, 362,781 to missing)

{com}. replace edu_long       = . if hfaudd_h == .
{txt}(362,781 real changes made, 362,781 to missing)

{com}. 
. gen female = koen == 2
{txt}
{com}. gen native = IE_TYPE == 1 
{txt}
{com}. 
. replace female = . if koen == .
{txt}(256,386 real changes made, 256,386 to missing)

{com}. replace native = . if IE_TYPE == .
{txt}(256,386 real changes made, 256,386 to missing)

{com}. 
. capture log close
{smcl}
{com}{sf}{ul off}{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}E:\workdata\704429\Projektfiles\overreporting\res/overreporting_log.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}20 Dec 2018, 13:48:20
{txt}
{com}. 
. * recode selfreported turnout to 0/1 instead of 0/100 
. recode d1ny 100 = 1 
{txt}(d1ny: 2081 changes made)

{com}. 
. ** Table 2
. 
. * Population model
. logit stemt alder_ved_valg i.hfaudd_hovedgruppe i.koen i.IE ///
>  if alder_ved_valg < 76 // model 1

{res}{txt}Iteration 0:{space 3}log likelihood = {res:-1086261.1}  
Iteration 1:{space 3}log likelihood = {res:-1008692.8}  
Iteration 2:{space 3}log likelihood = {res:-994424.74}  
Iteration 3:{space 3}log likelihood = {res:-994324.94}  
Iteration 4:{space 3}log likelihood = {res:-994324.77}  
Iteration 5:{space 3}log likelihood = {res:-994324.77}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res} 2,771,822
{txt}{col 49}LR chi2({res}7{txt}){col 67}= {res} 183872.62
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log likelihood = {res}-994324.77{txt}{col 49}Pseudo R2{col 67}= {res}    0.0846

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                stemt{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0176231{col 35}{space 2} .0001152{col 46}{space 1}  152.98{col 55}{space 3}0.000{col 63}{space 4} .0173973{col 76}{space 3} .0178488
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2}   .82509{col 35}{space 2} .0063079{col 46}{space 1}  130.80{col 55}{space 3}0.000{col 63}{space 4} .8127268{col 76}{space 3} .8374532
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .6232923{col 35}{space 2} .0044338{col 46}{space 1}  140.58{col 55}{space 3}0.000{col 63}{space 4} .6146023{col 76}{space 3} .6319823
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.350169{col 35}{space 2} .0061011{col 46}{space 1}  221.30{col 55}{space 3}0.000{col 63}{space 4} 1.338211{col 76}{space 3} 1.362127
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} 1.816497{col 35}{space 2} .0103233{col 46}{space 1}  175.96{col 55}{space 3}0.000{col 63}{space 4} 1.796264{col 76}{space 3}  1.83673
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .2600497{col 35}{space 2} .0037183{col 46}{space 1}   69.94{col 55}{space 3}0.000{col 63}{space 4}  .252762{col 76}{space 3} .2673375
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-1.419911{col 35}{space 2} .0061906{col 46}{space 1} -229.36{col 55}{space 3}0.000{col 63}{space 4}-1.432044{col 76}{space 3}-1.407778
{txt}{space 16}_cons {c |}{col 23}{res}{space 2} .4665619{col 35}{space 2} .0056403{col 46}{space 1}   82.72{col 55}{space 3}0.000{col 63}{space 4} .4555071{col 76}{space 3} .4776167
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res} 2,771,822
{txt}Model VCE{col 14}: {res}OIM

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(stemt), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0018753{col 35}{space 2} .0000122{col 46}{space 1}  153.64{col 55}{space 3}0.000{col 63}{space 4} .0018513{col 76}{space 3} .0018992
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .1053683{col 35}{space 2} .0007049{col 46}{space 1}  149.47{col 55}{space 3}0.000{col 63}{space 4} .1039867{col 76}{space 3}   .10675
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0846105{col 35}{space 2} .0006024{col 46}{space 1}  140.45{col 55}{space 3}0.000{col 63}{space 4} .0834297{col 76}{space 3} .0857912
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .1467002{col 35}{space 2} .0005822{col 46}{space 1}  251.96{col 55}{space 3}0.000{col 63}{space 4}  .145559{col 76}{space 3} .1478414
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .1711824{col 35}{space 2} .0006327{col 46}{space 1}  270.55{col 55}{space 3}0.000{col 63}{space 4} .1699422{col 76}{space 3} .1724225
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2}  .027623{col 35}{space 2} .0003936{col 46}{space 1}   70.18{col 55}{space 3}0.000{col 63}{space 4} .0268516{col 76}{space 3} .0283945
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.2197377{col 35}{space 2}  .001222{col 46}{space 1} -179.82{col 55}{space 3}0.000{col 63}{space 4}-.2221327{col 76}{space 3}-.2173427
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q0
{txt}
{com}. 
. * Sampling frame model
. logit stemt alder_ved_val i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] if _m == 3 // model 2

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-1107564.2}  
Iteration 1:{space 3}log pseudolikelihood = {res:-1017389.8}  
Iteration 2:{space 3}log pseudolikelihood = {res:-1001168.1}  
Iteration 3:{space 3}log pseudolikelihood = {res:-1000736.2}  
Iteration 4:{space 3}log pseudolikelihood = {res:-1000734.2}  
Iteration 5:{space 3}log pseudolikelihood = {res:-1000734.2}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     3,107
{txt}{col 49}Wald chi2({res}7{txt}){col 67}= {res}    195.82
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-1000734.2{txt}{col 49}Pseudo R2{col 67}= {res}    0.0965

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}                stemt{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0177365{col 35}{space 2} .0034315{col 46}{space 1}    5.17{col 55}{space 3}0.000{col 63}{space 4} .0110108{col 76}{space 3} .0244622
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .7168343{col 35}{space 2} .1629161{col 46}{space 1}    4.40{col 55}{space 3}0.000{col 63}{space 4} .3975247{col 76}{space 3} 1.036144
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2}  .518587{col 35}{space 2} .1369636{col 46}{space 1}    3.79{col 55}{space 3}0.000{col 63}{space 4} .2501432{col 76}{space 3} .7870307
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.627816{col 35}{space 2} .2051035{col 46}{space 1}    7.94{col 55}{space 3}0.000{col 63}{space 4} 1.225821{col 76}{space 3} 2.029812
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} 2.678019{col 35}{space 2} .4669646{col 46}{space 1}    5.73{col 55}{space 3}0.000{col 63}{space 4} 1.762785{col 76}{space 3} 3.593253
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .1420822{col 35}{space 2} .1118097{col 46}{space 1}    1.27{col 55}{space 3}0.204{col 63}{space 4}-.0770607{col 76}{space 3} .3612251
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-1.404203{col 35}{space 2}  .197422{col 46}{space 1}   -7.11{col 55}{space 3}0.000{col 63}{space 4}-1.791143{col 76}{space 3}-1.017264
{txt}{space 16}_cons {c |}{col 23}{res}{space 2}  .467157{col 35}{space 2}  .156451{col 46}{space 1}    2.99{col 55}{space 3}0.003{col 63}{space 4} .1605186{col 76}{space 3} .7737953
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post 
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     3,107
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(stemt), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0019181{col 35}{space 2} .0003557{col 46}{space 1}    5.39{col 55}{space 3}0.000{col 63}{space 4}  .001221{col 76}{space 3} .0026153
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .0973697{col 35}{space 2} .0202915{col 46}{space 1}    4.80{col 55}{space 3}0.000{col 63}{space 4} .0575991{col 76}{space 3} .1371403
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0746997{col 35}{space 2}  .019769{col 46}{space 1}    3.78{col 55}{space 3}0.000{col 63}{space 4} .0359533{col 76}{space 3} .1134461
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .1675208{col 35}{space 2} .0178105{col 46}{space 1}    9.41{col 55}{space 3}0.000{col 63}{space 4}  .132613{col 76}{space 3} .2024286
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .2031308{col 35}{space 2} .0174665{col 46}{space 1}   11.63{col 55}{space 3}0.000{col 63}{space 4}  .168897{col 76}{space 3} .2373645
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .0153498{col 35}{space 2} .0120412{col 46}{space 1}    1.27{col 55}{space 3}0.202{col 63}{space 4}-.0082506{col 76}{space 3} .0389502
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.2165964{col 35}{space 2} .0384158{col 46}{space 1}   -5.64{col 55}{space 3}0.000{col 63}{space 4}-.2918901{col 76}{space 3}-.1413028
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q1
{txt}
{com}. 
. * Respondents model
. logit stemt alder_ved_val i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] if _m == 3 & d1ny!=. // model 3

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-357115.43}  
Iteration 1:{space 3}log pseudolikelihood = {res:-335027.81}  
Iteration 2:{space 3}log pseudolikelihood = {res:-327601.21}  
Iteration 3:{space 3}log pseudolikelihood = {res:-327377.89}  
Iteration 4:{space 3}log pseudolikelihood = {res:-327377.23}  
Iteration 5:{space 3}log pseudolikelihood = {res:-327377.23}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     1,597
{txt}{col 49}Wald chi2({res}7{txt}){col 67}= {res}     58.64
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-327377.23{txt}{col 49}Pseudo R2{col 67}= {res}    0.0833

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}                stemt{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0215701{col 35}{space 2} .0064784{col 46}{space 1}    3.33{col 55}{space 3}0.001{col 63}{space 4} .0088727{col 76}{space 3} .0342675
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .9137796{col 35}{space 2} .3005447{col 46}{space 1}    3.04{col 55}{space 3}0.002{col 63}{space 4} .3247229{col 76}{space 3} 1.502836
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .6047304{col 35}{space 2} .2698151{col 46}{space 1}    2.24{col 55}{space 3}0.025{col 63}{space 4} .0759026{col 76}{space 3} 1.133558
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.494711{col 35}{space 2} .3492378{col 46}{space 1}    4.28{col 55}{space 3}0.000{col 63}{space 4} .8102171{col 76}{space 3} 2.179204
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} 3.061288{col 35}{space 2} 1.017869{col 46}{space 1}    3.01{col 55}{space 3}0.003{col 63}{space 4} 1.066301{col 76}{space 3} 5.056274
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2}-.0071244{col 35}{space 2}  .204919{col 46}{space 1}   -0.03{col 55}{space 3}0.972{col 63}{space 4}-.4087583{col 76}{space 3} .3945094
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.8300617{col 35}{space 2} .3654242{col 46}{space 1}   -2.27{col 55}{space 3}0.023{col 63}{space 4} -1.54628{col 76}{space 3}-.1138434
{txt}{space 16}_cons {c |}{col 23}{res}{space 2} .9958499{col 35}{space 2} .2756233{col 46}{space 1}    3.61{col 55}{space 3}0.000{col 63}{space 4} .4556382{col 76}{space 3} 1.536062
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post  
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     1,597
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(stemt), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0012612{col 35}{space 2} .0003671{col 46}{space 1}    3.44{col 55}{space 3}0.001{col 63}{space 4} .0005417{col 76}{space 3} .0019806
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .0702471{col 35}{space 2} .0216605{col 46}{space 1}    3.24{col 55}{space 3}0.001{col 63}{space 4} .0277934{col 76}{space 3} .1127008
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0520465{col 35}{space 2}  .023651{col 46}{space 1}    2.20{col 55}{space 3}0.028{col 63}{space 4} .0056914{col 76}{space 3} .0984015
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .0935527{col 35}{space 2} .0208014{col 46}{space 1}    4.50{col 55}{space 3}0.000{col 63}{space 4} .0527828{col 76}{space 3} .1343226
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2}  .118377{col 35}{space 2} .0194491{col 46}{space 1}    6.09{col 55}{space 3}0.000{col 63}{space 4} .0802574{col 76}{space 3} .1564966
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2}-.0004166{col 35}{space 2} .0119839{col 46}{space 1}   -0.03{col 55}{space 3}0.972{col 63}{space 4}-.0239047{col 76}{space 3} .0230715
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.0656794{col 35}{space 2} .0370547{col 46}{space 1}   -1.77{col 55}{space 3}0.076{col 63}{space 4}-.1383053{col 76}{space 3} .0069465
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q2
{txt}
{com}. 
. * Self-reported model
. logit d1ny alder_ved_valg i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] if _m == 3 & stemt != . // model 4

{txt}note: 5.hfaudd_hovedgruppe != 0 predicts success perfectly
      5.hfaudd_hovedgruppe dropped and 150 obs not used

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-235095.36}  
Iteration 1:{space 3}log pseudolikelihood = {res:-223702.02}  
Iteration 2:{space 3}log pseudolikelihood = {res:-221073.98}  
Iteration 3:{space 3}log pseudolikelihood = {res:-221067.95}  
Iteration 4:{space 3}log pseudolikelihood = {res:-221067.95}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     1,447
{txt}{col 49}Wald chi2({res}6{txt}){col 67}= {res}     35.90
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-221067.95{txt}{col 49}Pseudo R2{col 67}= {res}    0.0597

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}                 d1ny{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0258585{col 35}{space 2} .0083448{col 46}{space 1}    3.10{col 55}{space 3}0.002{col 63}{space 4} .0095031{col 76}{space 3} .0422139
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} 1.187775{col 35}{space 2} .4534832{col 46}{space 1}    2.62{col 55}{space 3}0.009{col 63}{space 4} .2989638{col 76}{space 3} 2.076585
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .3514579{col 35}{space 2} .3391024{col 46}{space 1}    1.04{col 55}{space 3}0.300{col 63}{space 4}-.3131706{col 76}{space 3} 1.016086
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.509669{col 35}{space 2} .4825815{col 46}{space 1}    3.13{col 55}{space 3}0.002{col 63}{space 4} .5638265{col 76}{space 3} 2.455511
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (empty)
{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2}  .112476{col 35}{space 2} .2662603{col 46}{space 1}    0.42{col 55}{space 3}0.673{col 63}{space 4}-.4093846{col 76}{space 3} .6343366
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.1614558{col 35}{space 2} .5842905{col 46}{space 1}   -0.28{col 55}{space 3}0.782{col 63}{space 4}-1.306644{col 76}{space 3} .9837325
{txt}{space 16}_cons {c |}{col 23}{res}{space 2} 1.349702{col 35}{space 2} .3301899{col 46}{space 1}    4.09{col 55}{space 3}0.000{col 63}{space 4}  .702542{col 76}{space 3} 1.996863
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post 
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     1,447
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(d1ny), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0010468{col 35}{space 2} .0003325{col 46}{space 1}    3.15{col 55}{space 3}0.002{col 63}{space 4} .0003951{col 76}{space 3} .0016984
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .0482267{col 35}{space 2} .0162657{col 46}{space 1}    2.96{col 55}{space 3}0.003{col 63}{space 4} .0163466{col 76}{space 3} .0801069
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0198595{col 35}{space 2}  .019393{col 46}{space 1}    1.02{col 55}{space 3}0.306{col 63}{space 4}  -.01815{col 76}{space 3} .0578691
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .0544559{col 35}{space 2} .0162207{col 46}{space 1}    3.36{col 55}{space 3}0.001{col 63}{space 4} .0226639{col 76}{space 3} .0862479
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2}        .{col 35}{txt}  (not estimable)
{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .0045398{col 35}{space 2} .0107152{col 46}{space 1}    0.42{col 55}{space 3}0.672{col 63}{space 4}-.0164617{col 76}{space 3} .0255412
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.0069744{col 35}{space 2}  .026868{col 46}{space 1}   -0.26{col 55}{space 3}0.795{col 63}{space 4}-.0596348{col 76}{space 3}  .045686
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q3
{txt}
{com}. 
. esttab q1 q2 q3 q0 using res/figure1_data.txt, ///
> replace b(a4) se(a4) nostar nogaps  nobase nopar nolines nonum noobs nonotes
{res}{txt}(output written to {browse  `"res/figure1_data.txt"'})

{com}. 
. ** Predicting survey response: table 2
. 
. logit deltog alder_ved_val i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] if stemt != . & _m == 3

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-1917940.6}  
Iteration 1:{space 3}log pseudolikelihood = {res:-1852889.9}  
Iteration 2:{space 3}log pseudolikelihood = {res:-1852756.7}  
Iteration 3:{space 3}log pseudolikelihood = {res:-1852756.7}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     3,107
{txt}{col 49}Wald chi2({res}7{txt}){col 67}= {res}    133.93
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-1852756.7{txt}{col 49}Pseudo R2{col 67}= {res}    0.0340

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}               deltog{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0146402{col 35}{space 2} .0023987{col 46}{space 1}    6.10{col 55}{space 3}0.000{col 63}{space 4} .0099388{col 76}{space 3} .0193415
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .3245028{col 35}{space 2} .1267611{col 46}{space 1}    2.56{col 55}{space 3}0.010{col 63}{space 4} .0760555{col 76}{space 3}   .57295
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .1782381{col 35}{space 2} .1015696{col 46}{space 1}    1.75{col 55}{space 3}0.079{col 63}{space 4}-.0208346{col 76}{space 3} .3773108
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .7799971{col 35}{space 2} .1142963{col 46}{space 1}    6.82{col 55}{space 3}0.000{col 63}{space 4} .5559805{col 76}{space 3} 1.004014
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .9779327{col 35}{space 2} .1651328{col 46}{space 1}    5.92{col 55}{space 3}0.000{col 63}{space 4} .6542784{col 76}{space 3} 1.301587
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} -.117671{col 35}{space 2} .0780281{col 46}{space 1}   -1.51{col 55}{space 3}0.132{col 63}{space 4}-.2706033{col 76}{space 3} .0352613
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.6403416{col 35}{space 2} .1855553{col 46}{space 1}   -3.45{col 55}{space 3}0.001{col 63}{space 4}-1.004023{col 76}{space 3}-.2766599
{txt}{space 16}_cons {c |}{col 23}{res}{space 2}-.7802864{col 35}{space 2} .1244964{col 46}{space 1}   -6.27{col 55}{space 3}0.000{col 63}{space 4}-1.024295{col 76}{space 3}-.5362779
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     3,107
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(deltog), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0034735{col 35}{space 2} .0005559{col 46}{space 1}    6.25{col 55}{space 3}0.000{col 63}{space 4} .0023839{col 76}{space 3} .0045631
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .0793487{col 35}{space 2} .0308175{col 46}{space 1}    2.57{col 55}{space 3}0.010{col 63}{space 4} .0189476{col 76}{space 3} .1397498
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2}  .043552{col 35}{space 2} .0248301{col 46}{space 1}    1.75{col 55}{space 3}0.079{col 63}{space 4}-.0051141{col 76}{space 3} .0922182
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .1871667{col 35}{space 2} .0267438{col 46}{space 1}    7.00{col 55}{space 3}0.000{col 63}{space 4} .1347497{col 76}{space 3} .2395836
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .2305815{col 35}{space 2} .0361826{col 46}{space 1}    6.37{col 55}{space 3}0.000{col 63}{space 4} .1596649{col 76}{space 3}  .301498
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2}-.0279126{col 35}{space 2} .0184854{col 46}{space 1}   -1.51{col 55}{space 3}0.131{col 63}{space 4}-.0641432{col 76}{space 3} .0083181
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.1515948{col 35}{space 2} .0424958{col 46}{space 1}   -3.57{col 55}{space 3}0.000{col 63}{space 4}-.2348851{col 76}{space 3}-.0683045
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q4a
{txt}
{com}. 
. logit deltog alder_ved_val i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] if _m == 3

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-2535482.3}  
Iteration 1:{space 3}log pseudolikelihood = {res:-2442472.8}  
Iteration 2:{space 3}log pseudolikelihood = {res:-2442251.4}  
Iteration 3:{space 3}log pseudolikelihood = {res:-2442251.4}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     4,061
{txt}{col 49}Wald chi2({res}7{txt}){col 67}= {res}    190.96
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-2442251.4{txt}{col 49}Pseudo R2{col 67}= {res}    0.0368

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}               deltog{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0147188{col 35}{space 2} .0021049{col 46}{space 1}    6.99{col 55}{space 3}0.000{col 63}{space 4} .0105932{col 76}{space 3} .0188443
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .4228606{col 35}{space 2} .1153146{col 46}{space 1}    3.67{col 55}{space 3}0.000{col 63}{space 4} .1968482{col 76}{space 3} .6488729
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .3125708{col 35}{space 2}   .08622{col 46}{space 1}    3.63{col 55}{space 3}0.000{col 63}{space 4} .1435827{col 76}{space 3} .4815589
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .9202839{col 35}{space 2} .1005061{col 46}{space 1}    9.16{col 55}{space 3}0.000{col 63}{space 4} .7232956{col 76}{space 3} 1.117272
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} 1.089561{col 35}{space 2}  .150185{col 46}{space 1}    7.25{col 55}{space 3}0.000{col 63}{space 4} .7952042{col 76}{space 3} 1.383919
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2}-.0731205{col 35}{space 2} .0683566{col 46}{space 1}   -1.07{col 55}{space 3}0.285{col 63}{space 4} -.207097{col 76}{space 3}  .060856
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.5409135{col 35}{space 2} .1694494{col 46}{space 1}   -3.19{col 55}{space 3}0.001{col 63}{space 4}-.8730282{col 76}{space 3}-.2087988
{txt}{space 16}_cons {c |}{col 23}{res}{space 2}-.8430579{col 35}{space 2} .1105307{col 46}{space 1}   -7.63{col 55}{space 3}0.000{col 63}{space 4}-1.059694{col 76}{space 3}-.6264216
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     4,061
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(deltog), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0034628{col 35}{space 2} .0004837{col 46}{space 1}    7.16{col 55}{space 3}0.000{col 63}{space 4} .0025148{col 76}{space 3} .0044108
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .1035005{col 35}{space 2} .0279421{col 46}{space 1}    3.70{col 55}{space 3}0.000{col 63}{space 4} .0487349{col 76}{space 3} .1582661
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0765697{col 35}{space 2} .0210968{col 46}{space 1}    3.63{col 55}{space 3}0.000{col 63}{space 4} .0352207{col 76}{space 3} .1179187
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .2192985{col 35}{space 2} .0230474{col 46}{space 1}    9.52{col 55}{space 3}0.000{col 63}{space 4} .1741265{col 76}{space 3} .2644705
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .2552401{col 35}{space 2} .0319811{col 46}{space 1}    7.98{col 55}{space 3}0.000{col 63}{space 4} .1925582{col 76}{space 3}  .317922
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2}-.0171983{col 35}{space 2} .0160671{col 46}{space 1}   -1.07{col 55}{space 3}0.284{col 63}{space 4}-.0486892{col 76}{space 3} .0142926
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.1281212{col 35}{space 2}  .039537{col 46}{space 1}   -3.24{col 55}{space 3}0.001{col 63}{space 4}-.2056123{col 76}{space 3}  -.05063
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q4b
{txt}
{com}. 
. esttab q4a q4b using res/marginal_responded_weight.txt, ///
> replace b(a4) se(a4) nostar nogaps  nobase nopar nolines nonum noobs nonotes
{res}{txt}(output written to {browse  `"res/marginal_responded_weight.txt"'})

{com}. 
. 
. ************************************************
. ************************************************
. ** Supporting analyses 
. ************************************************
. ************************************************
. 
. capture log close
{smcl}
{com}{sf}{ul off}{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}E:\workdata\704429\Projektfiles\overreporting\res/overreporting_log.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}20 Dec 2018, 14:01:30
{txt}
{com}. 
. ** Predicting turnout among non-respondents: Table S2
. 
. logit stemt alder_ved_val i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] if d1ny==. & _m == 3

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res: -681272.4}  
Iteration 1:{space 3}log pseudolikelihood = {res:-629209.13}  
Iteration 2:{space 3}log pseudolikelihood = {res:-625277.85}  
Iteration 3:{space 3}log pseudolikelihood = {res: -625228.4}  
Iteration 4:{space 3}log pseudolikelihood = {res:-625228.34}  
Iteration 5:{space 3}log pseudolikelihood = {res:-625228.34}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     1,510
{txt}{col 49}Wald chi2({res}7{txt}){col 67}= {res}    104.79
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-625228.34{txt}{col 49}Pseudo R2{col 67}= {res}    0.0823

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}                stemt{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0116545{col 35}{space 2} .0043088{col 46}{space 1}    2.70{col 55}{space 3}0.007{col 63}{space 4} .0032094{col 76}{space 3} .0200995
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .6037062{col 35}{space 2} .2048724{col 46}{space 1}    2.95{col 55}{space 3}0.003{col 63}{space 4} .2021636{col 76}{space 3} 1.005249
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .4466272{col 35}{space 2}   .16273{col 46}{space 1}    2.74{col 55}{space 3}0.006{col 63}{space 4} .1276822{col 76}{space 3} .7655721
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.528648{col 35}{space 2} .2596528{col 46}{space 1}    5.89{col 55}{space 3}0.000{col 63}{space 4} 1.019738{col 76}{space 3} 2.037558
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2}  2.19388{col 35}{space 2} .5154014{col 46}{space 1}    4.26{col 55}{space 3}0.000{col 63}{space 4} 1.183712{col 76}{space 3} 3.204049
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .2468662{col 35}{space 2} .1367643{col 46}{space 1}    1.81{col 55}{space 3}0.071{col 63}{space 4}-.0211869{col 76}{space 3} .5149192
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-1.481312{col 35}{space 2} .2465628{col 46}{space 1}   -6.01{col 55}{space 3}0.000{col 63}{space 4}-1.964566{col 76}{space 3}-.9980575
{txt}{space 16}_cons {c |}{col 23}{res}{space 2} .2852363{col 35}{space 2} .1968424{col 46}{space 1}    1.45{col 55}{space 3}0.147{col 63}{space 4}-.1005678{col 76}{space 3} .6710404
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     1,510
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(stemt), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0018075{col 35}{space 2} .0006492{col 46}{space 1}    2.78{col 55}{space 3}0.005{col 63}{space 4} .0005352{col 76}{space 3} .0030799
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .1079596{col 35}{space 2} .0338822{col 46}{space 1}    3.19{col 55}{space 3}0.001{col 63}{space 4} .0415518{col 76}{space 3} .1743674
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0828401{col 35}{space 2} .0299881{col 46}{space 1}    2.76{col 55}{space 3}0.006{col 63}{space 4} .0240646{col 76}{space 3} .1416156
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .2150613{col 35}{space 2} .0291451{col 46}{space 1}    7.38{col 55}{space 3}0.000{col 63}{space 4}  .157938{col 76}{space 3} .2721847
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .2574766{col 35}{space 2} .0325328{col 46}{space 1}    7.91{col 55}{space 3}0.000{col 63}{space 4} .1937135{col 76}{space 3} .3212397
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .0383497{col 35}{space 2} .0212033{col 46}{space 1}    1.81{col 55}{space 3}0.071{col 63}{space 4}-.0032081{col 76}{space 3} .0799075
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.2944307{col 35}{space 2} .0545425{col 46}{space 1}   -5.40{col 55}{space 3}0.000{col 63}{space 4}-.4013321{col 76}{space 3}-.1875294
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q5
{txt}
{com}. 
. esttab q5 using res/marginal_nonrespondents_weight.txt, ///
> replace b(a4) se(a4) nostar nogaps  nobase nopar nolines nonum noobs nonotes
{res}{txt}(output written to {browse  `"res/marginal_nonrespondents_weight.txt"'})

{com}. 
. 
. ** Predicting overreporting among respondents: Table S3
. 
. logit d1ny alder_ved_valg i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] if stemt == 0

{txt}note: 5.hfaudd_hovedgruppe != 0 predicts success perfectly
      5.hfaudd_hovedgruppe dropped and 1 obs not used

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-65548.441}  
Iteration 1:{space 3}log pseudolikelihood = {res:-63413.686}  
Iteration 2:{space 3}log pseudolikelihood = {res: -63411.47}  
Iteration 3:{space 3}log pseudolikelihood = {res: -63411.47}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}       119
{txt}{col 49}Wald chi2({res}6{txt}){col 67}= {res}      5.19
{txt}{col 49}Prob > chi2{col 67}= {res}    0.5193
{txt}Log pseudolikelihood = {res} -63411.47{txt}{col 49}Pseudo R2{col 67}= {res}    0.0326

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}                 d1ny{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0134618{col 35}{space 2} .0126247{col 46}{space 1}    1.07{col 55}{space 3}0.286{col 63}{space 4}-.0112821{col 76}{space 3} .0382058
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .7324546{col 35}{space 2} .6400641{col 46}{space 1}    1.14{col 55}{space 3}0.252{col 63}{space 4} -.522048{col 76}{space 3} 1.986957
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2}-.1681084{col 35}{space 2} .4935367{col 46}{space 1}   -0.34{col 55}{space 3}0.733{col 63}{space 4}-1.135423{col 76}{space 3} .7992056
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .6538043{col 35}{space 2} .6778036{col 46}{space 1}    0.96{col 55}{space 3}0.335{col 63}{space 4}-.6746665{col 76}{space 3} 1.982275
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (empty)
{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2}-.1050509{col 35}{space 2}  .420763{col 46}{space 1}   -0.25{col 55}{space 3}0.803{col 63}{space 4}-.9297313{col 76}{space 3} .7196294
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2} 1.134575{col 35}{space 2} .7246295{col 46}{space 1}    1.57{col 55}{space 3}0.117{col 63}{space 4}-.2856723{col 76}{space 3} 2.554823
{txt}{space 16}_cons {c |}{col 23}{res}{space 2}-.9506524{col 35}{space 2} .6027831{col 46}{space 1}   -1.58{col 55}{space 3}0.115{col 63}{space 4}-2.132086{col 76}{space 3} .2307808
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}       119
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(d1ny), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0031664{col 35}{space 2} .0029279{col 46}{space 1}    1.08{col 55}{space 3}0.279{col 63}{space 4}-.0025722{col 76}{space 3}  .008905
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .1765753{col 35}{space 2}   .14994{col 46}{space 1}    1.18{col 55}{space 3}0.239{col 63}{space 4}-.1173017{col 76}{space 3} .4704523
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2}-.0390523{col 35}{space 2} .1141341{col 46}{space 1}   -0.34{col 55}{space 3}0.732{col 63}{space 4}-.2627511{col 76}{space 3} .1846465
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .1578852{col 35}{space 2} .1617727{col 46}{space 1}    0.98{col 55}{space 3}0.329{col 63}{space 4}-.1591834{col 76}{space 3} .4749539
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2}        .{col 35}{txt}  (not estimable)
{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} -.024647{col 35}{space 2}  .098446{col 46}{space 1}   -0.25{col 55}{space 3}0.802{col 63}{space 4}-.2175977{col 76}{space 3} .1683036
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2} .2656453{col 35}{space 2} .1534845{col 46}{space 1}    1.73{col 55}{space 3}0.083{col 63}{space 4}-.0351788{col 76}{space 3} .5664695
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q15
{txt}
{com}. 
. esttab q15 using res/marginal_overreport_weight.txt, ///
> replace b(a4) se(a4) nostar nogaps  nobase nopar nolines nonum noobs nonotes
{res}{txt}(output written to {browse  `"res/marginal_overreport_weight.txt"'})

{com}. 
. ** Predicted self-reported turnout for res in all municipalities, and split by
. ** having validated turnout or not 
. ** Model estimates for Figure S1 
. 
. logit d1ny alder_ved_valg i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] // all voters 

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-341977.19}  
Iteration 1:{space 3}log pseudolikelihood = {res: -323752.5}  
Iteration 2:{space 3}log pseudolikelihood = {res:-317422.57}  
Iteration 3:{space 3}log pseudolikelihood = {res:-317368.35}  
Iteration 4:{space 3}log pseudolikelihood = {res:-317368.17}  
Iteration 5:{space 3}log pseudolikelihood = {res:-317368.17}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     2,133
{txt}{col 49}Wald chi2({res}7{txt}){col 67}= {res}     58.55
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-317368.17{txt}{col 49}Pseudo R2{col 67}= {res}    0.0720

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}                 d1ny{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0212954{col 35}{space 2} .0066125{col 46}{space 1}    3.22{col 55}{space 3}0.001{col 63}{space 4}  .008335{col 76}{space 3} .0342557
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} 1.407301{col 35}{space 2} .4379426{col 46}{space 1}    3.21{col 55}{space 3}0.001{col 63}{space 4} .5489492{col 76}{space 3} 2.265653
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .5294078{col 35}{space 2} .2690902{col 46}{space 1}    1.97{col 55}{space 3}0.049{col 63}{space 4} .0020008{col 76}{space 3} 1.056815
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.577352{col 35}{space 2} .4102997{col 46}{space 1}    3.84{col 55}{space 3}0.000{col 63}{space 4} .7731789{col 76}{space 3} 2.381524
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} 2.380213{col 35}{space 2} .7772727{col 46}{space 1}    3.06{col 55}{space 3}0.002{col 63}{space 4} .8567862{col 76}{space 3} 3.903639
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2}   .36523{col 35}{space 2}  .227465{col 46}{space 1}    1.61{col 55}{space 3}0.108{col 63}{space 4}-.0805931{col 76}{space 3} .8110531
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.5607021{col 35}{space 2} .4872386{col 46}{space 1}   -1.15{col 55}{space 3}0.250{col 63}{space 4}-1.515672{col 76}{space 3} .3942681
{txt}{space 16}_cons {c |}{col 23}{res}{space 2} 1.339107{col 35}{space 2} .2849766{col 46}{space 1}    4.70{col 55}{space 3}0.000{col 63}{space 4}  .780563{col 76}{space 3} 1.897651
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     2,133
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(d1ny), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0008068{col 35}{space 2} .0002455{col 46}{space 1}    3.29{col 55}{space 3}0.001{col 63}{space 4} .0003257{col 76}{space 3}  .001288
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .0575229{col 35}{space 2} .0145848{col 46}{space 1}    3.94{col 55}{space 3}0.000{col 63}{space 4} .0289373{col 76}{space 3} .0861085
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0303087{col 35}{space 2} .0158762{col 46}{space 1}    1.91{col 55}{space 3}0.056{col 63}{space 4} -.000808{col 76}{space 3} .0614254
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .0606629{col 35}{space 2} .0143754{col 46}{space 1}    4.22{col 55}{space 3}0.000{col 63}{space 4} .0324876{col 76}{space 3} .0888382
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .0701542{col 35}{space 2} .0140327{col 46}{space 1}    5.00{col 55}{space 3}0.000{col 63}{space 4} .0426506{col 76}{space 3} .0976578
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2}  .013677{col 35}{space 2} .0084398{col 46}{space 1}    1.62{col 55}{space 3}0.105{col 63}{space 4}-.0028646{col 76}{space 3} .0302186
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.0266659{col 35}{space 2} .0285154{col 46}{space 1}   -0.94{col 55}{space 3}0.350{col 63}{space 4}-.0825551{col 76}{space 3} .0292233
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q9
{txt}
{com}. 
. logit d1ny alder_ved_valg i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] if turnout_missing == 1 // only missing 

{txt}note: 2.hfaudd_hovedgruppe != 0 predicts success perfectly
      2.hfaudd_hovedgruppe dropped and 34 obs not used

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-98705.506}  
Iteration 1:{space 3}log pseudolikelihood = {res:-93781.947}  
Iteration 2:{space 3}log pseudolikelihood = {res:-89941.896}  
Iteration 3:{space 3}log pseudolikelihood = {res: -89898.89}  
Iteration 4:{space 3}log pseudolikelihood = {res:-89898.717}  
Iteration 5:{space 3}log pseudolikelihood = {res:-89898.717}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}       502
{txt}{col 49}Wald chi2({res}6{txt}){col 67}= {res}     17.77
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0068
{txt}Log pseudolikelihood = {res}-89898.717{txt}{col 49}Pseudo R2{col 67}= {res}    0.0892

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}                 d1ny{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0129831{col 35}{space 2} .0117429{col 46}{space 1}    1.11{col 55}{space 3}0.269{col 63}{space 4}-.0100326{col 76}{space 3} .0359989
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (empty)
{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .8737437{col 35}{space 2} .4627689{col 46}{space 1}    1.89{col 55}{space 3}0.059{col 63}{space 4}-.0332667{col 76}{space 3} 1.780754
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.784659{col 35}{space 2} .7421004{col 46}{space 1}    2.40{col 55}{space 3}0.016{col 63}{space 4} .3301688{col 76}{space 3} 3.239149
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} 1.002816{col 35}{space 2} .8752808{col 46}{space 1}    1.15{col 55}{space 3}0.252{col 63}{space 4} -.712703{col 76}{space 3} 2.718335
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .9582774{col 35}{space 2} .4565665{col 46}{space 1}    2.10{col 55}{space 3}0.036{col 63}{space 4} .0634234{col 76}{space 3} 1.853131
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-1.523139{col 35}{space 2} .8214485{col 46}{space 1}   -1.85{col 55}{space 3}0.064{col 63}{space 4}-3.133149{col 76}{space 3} .0868699
{txt}{space 16}_cons {c |}{col 23}{res}{space 2} 1.282119{col 35}{space 2}  .613704{col 46}{space 1}    2.09{col 55}{space 3}0.037{col 63}{space 4} .0792814{col 76}{space 3} 2.484957
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}       502
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(d1ny), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0005697{col 35}{space 2} .0005002{col 46}{space 1}    1.14{col 55}{space 3}0.255{col 63}{space 4}-.0004107{col 76}{space 3}   .00155
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2}        .{col 35}{txt}  (not estimable)
{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0514849{col 35}{space 2} .0295306{col 46}{space 1}    1.74{col 55}{space 3}0.081{col 63}{space 4}-.0063941{col 76}{space 3} .1093639
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .0762515{col 35}{space 2} .0289056{col 46}{space 1}    2.64{col 55}{space 3}0.008{col 63}{space 4} .0195976{col 76}{space 3} .1329054
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .0563495{col 35}{space 2} .0390931{col 46}{space 1}    1.44{col 55}{space 3}0.149{col 63}{space 4}-.0202716{col 76}{space 3} .1329705
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .0403771{col 35}{space 2} .0184567{col 46}{space 1}    2.19{col 55}{space 3}0.029{col 63}{space 4} .0042026{col 76}{space 3} .0765515
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.1211791{col 35}{space 2} .1013835{col 46}{space 1}   -1.20{col 55}{space 3}0.232{col 63}{space 4} -.319887{col 76}{space 3} .0775289
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q10
{txt}
{com}. 
. esttab q9 q10 q3 using res/figures1_data.txt, ///
> replace b(a4) se(a4) nostar nogaps  nobase nopar nolines nonum noobs nonotes
{res}{txt}(output written to {browse  `"res/figures1_data.txt"'})

{com}. 
. 
. ** Predicting turnout in 2013 for voters with/without validated turnout
. ** conditional on responding to 2015 survey
. ** Model estimates for Figure S2
. 
. rename stemt stemtFV
{res}{txt}
{com}. rename _m _mFV
{res}{txt}
{com}. merge 1:1 pnr using "E:\workdata\704429\Grunddatanewest\30april_to_dst_final_11_feb_2014"
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}         104,762
{txt}{col 9}from master{col 30}{res}         104,348{txt}  (_merge==1)
{col 9}from using{col 30}{res}             414{txt}  (_merge==2)

{col 5}matched{col 30}{res}       4,570,748{txt}  (_merge==3)
{col 5}{hline 41}

{com}. keep if _merge == 3 
{txt}(104,762 observations deleted)

{com}. 
. logit stemt alder_ved_val i.hfaudd_hovedgruppe i.koen i.IE if _mFV == 3 // 2013 turnout all

{res}{txt}Iteration 0:{space 3}log likelihood = {res:-2248.5597}  
Iteration 1:{space 3}log likelihood = {res:-2080.2812}  
Iteration 2:{space 3}log likelihood = {res:-2075.9156}  
Iteration 3:{space 3}log likelihood = {res:-2075.9052}  
Iteration 4:{space 3}log likelihood = {res:-2075.9052}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     3,858
{txt}{col 49}LR chi2({res}7{txt}){col 67}= {res}    345.31
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log likelihood = {res}-2075.9052{txt}{col 49}Pseudo R2{col 67}= {res}    0.0768

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}                stemt{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0275998{col 35}{space 2} .0024786{col 46}{space 1}   11.14{col 55}{space 3}0.000{col 63}{space 4} .0227419{col 76}{space 3} .0324578
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .6023663{col 35}{space 2} .1212465{col 46}{space 1}    4.97{col 55}{space 3}0.000{col 63}{space 4} .3647275{col 76}{space 3}  .840005
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .4529869{col 35}{space 2} .0948779{col 46}{space 1}    4.77{col 55}{space 3}0.000{col 63}{space 4} .2670297{col 76}{space 3} .6389441
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.125194{col 35}{space 2} .1223249{col 46}{space 1}    9.20{col 55}{space 3}0.000{col 63}{space 4} .8854421{col 76}{space 3} 1.364947
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} 1.148807{col 35}{space 2} .1834438{col 46}{space 1}    6.26{col 55}{space 3}0.000{col 63}{space 4} .7892635{col 76}{space 3}  1.50835
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .1827093{col 35}{space 2} .0769573{col 46}{space 1}    2.37{col 55}{space 3}0.018{col 63}{space 4} .0318757{col 76}{space 3} .3335429
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2} -1.03938{col 35}{space 2} .1644024{col 46}{space 1}   -6.32{col 55}{space 3}0.000{col 63}{space 4}-1.361602{col 76}{space 3}-.7171568
{txt}{space 16}_cons {c |}{col 23}{res}{space 2}-.6689287{col 35}{space 2} .1208414{col 46}{space 1}   -5.54{col 55}{space 3}0.000{col 63}{space 4}-.9057734{col 76}{space 3} -.432084
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     3,858
{txt}Model VCE{col 14}: {res}OIM

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(stemt), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0049439{col 35}{space 2} .0004209{col 46}{space 1}   11.74{col 55}{space 3}0.000{col 63}{space 4} .0041188{col 76}{space 3} .0057689
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .1199744{col 35}{space 2} .0228445{col 46}{space 1}    5.25{col 55}{space 3}0.000{col 63}{space 4} .0751999{col 76}{space 3} .1647488
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0926527{col 35}{space 2}  .019437{col 46}{space 1}    4.77{col 55}{space 3}0.000{col 63}{space 4} .0545568{col 76}{space 3} .1307486
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .2011458{col 35}{space 2} .0200172{col 46}{space 1}   10.05{col 55}{space 3}0.000{col 63}{space 4} .1619129{col 76}{space 3} .2403788
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .2042742{col 35}{space 2} .0267709{col 46}{space 1}    7.63{col 55}{space 3}0.000{col 63}{space 4} .1518042{col 76}{space 3} .2567442
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .0327628{col 35}{space 2} .0137875{col 46}{space 1}    2.38{col 55}{space 3}0.017{col 63}{space 4} .0057399{col 76}{space 3} .0597857
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.2155108{col 35}{space 2} .0367981{col 46}{space 1}   -5.86{col 55}{space 3}0.000{col 63}{space 4}-.2876337{col 76}{space 3}-.1433879
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q11
{txt}
{com}. logit stemt alder_ved_val i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights]  if deltog == 1 & _mFV == 3 // 2013 turnout all

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-871910.48}  
Iteration 1:{space 3}log pseudolikelihood = {res:-811037.04}  
Iteration 2:{space 3}log pseudolikelihood = {res:-807295.02}  
Iteration 3:{space 3}log pseudolikelihood = {res:-807284.57}  
Iteration 4:{space 3}log pseudolikelihood = {res:-807284.57}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     2,047
{txt}{col 49}Wald chi2({res}7{txt}){col 67}= {res}    142.09
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-807284.57{txt}{col 49}Pseudo R2{col 67}= {res}    0.0741

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}                stemt{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0358572{col 35}{space 2} .0040735{col 46}{space 1}    8.80{col 55}{space 3}0.000{col 63}{space 4} .0278732{col 76}{space 3} .0438411
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .5862316{col 35}{space 2} .2055404{col 46}{space 1}    2.85{col 55}{space 3}0.004{col 63}{space 4} .1833799{col 76}{space 3} .9890833
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .4487705{col 35}{space 2} .1625478{col 46}{space 1}    2.76{col 55}{space 3}0.006{col 63}{space 4} .1301827{col 76}{space 3} .7673583
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.140492{col 35}{space 2}  .197719{col 46}{space 1}    5.77{col 55}{space 3}0.000{col 63}{space 4} .7529702{col 76}{space 3} 1.528015
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} 1.228399{col 35}{space 2} .2693907{col 46}{space 1}    4.56{col 55}{space 3}0.000{col 63}{space 4} .7004034{col 76}{space 3} 1.756395
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .2025112{col 35}{space 2}  .127153{col 46}{space 1}    1.59{col 55}{space 3}0.111{col 63}{space 4}-.0467042{col 76}{space 3} .4517266
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.1412723{col 35}{space 2} .3515338{col 46}{space 1}   -0.40{col 55}{space 3}0.688{col 63}{space 4}-.8302659{col 76}{space 3} .5477213
{txt}{space 16}_cons {c |}{col 23}{res}{space 2}-.6886859{col 35}{space 2} .2084307{col 46}{space 1}   -3.30{col 55}{space 3}0.001{col 63}{space 4}-1.097203{col 76}{space 3}-.2801693
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     2,047
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(stemt), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0045295{col 35}{space 2} .0004814{col 46}{space 1}    9.41{col 55}{space 3}0.000{col 63}{space 4}  .003586{col 76}{space 3} .0054729
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .0899426{col 35}{space 2} .0300545{col 46}{space 1}    2.99{col 55}{space 3}0.003{col 63}{space 4} .0310369{col 76}{space 3} .1488483
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0713945{col 35}{space 2} .0265713{col 46}{space 1}    2.69{col 55}{space 3}0.007{col 63}{space 4} .0193157{col 76}{space 3} .1234734
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .1498411{col 35}{space 2} .0257167{col 46}{space 1}    5.83{col 55}{space 3}0.000{col 63}{space 4} .0994373{col 76}{space 3} .2002448
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .1573365{col 35}{space 2} .0293715{col 46}{space 1}    5.36{col 55}{space 3}0.000{col 63}{space 4} .0997694{col 76}{space 3} .2149037
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .0255759{col 35}{space 2} .0160306{col 46}{space 1}    1.60{col 55}{space 3}0.111{col 63}{space 4}-.0058434{col 76}{space 3} .0569953
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2} -.018553{col 35}{space 2} .0479472{col 46}{space 1}   -0.39{col 55}{space 3}0.699{col 63}{space 4}-.1125278{col 76}{space 3} .0754217
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q12
{txt}
{com}. logit stemt alder_ved_val i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] if turnout_missing == 0 & _mFV == 3 // 2013 turnout, validated 2015

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-1498552.3}  
Iteration 1:{space 3}log pseudolikelihood = {res:-1380535.7}  
Iteration 2:{space 3}log pseudolikelihood = {res:-1376913.4}  
Iteration 3:{space 3}log pseudolikelihood = {res:-1376905.8}  
Iteration 4:{space 3}log pseudolikelihood = {res:-1376905.8}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     2,930
{txt}{col 49}Wald chi2({res}7{txt}){col 67}= {res}    237.77
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-1376905.8{txt}{col 49}Pseudo R2{col 67}= {res}    0.0812

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}                stemt{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0295493{col 35}{space 2} .0029544{col 46}{space 1}   10.00{col 55}{space 3}0.000{col 63}{space 4} .0237587{col 76}{space 3} .0353399
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .7562745{col 35}{space 2} .1444058{col 46}{space 1}    5.24{col 55}{space 3}0.000{col 63}{space 4} .4732444{col 76}{space 3} 1.039305
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .4708877{col 35}{space 2} .1165939{col 46}{space 1}    4.04{col 55}{space 3}0.000{col 63}{space 4} .2423678{col 76}{space 3} .6994076
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.238734{col 35}{space 2} .1460184{col 46}{space 1}    8.48{col 55}{space 3}0.000{col 63}{space 4} .9525433{col 76}{space 3} 1.524925
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} 1.221578{col 35}{space 2} .2087986{col 46}{space 1}    5.85{col 55}{space 3}0.000{col 63}{space 4} .8123399{col 76}{space 3} 1.630815
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .0747888{col 35}{space 2} .0929009{col 46}{space 1}    0.81{col 55}{space 3}0.421{col 63}{space 4}-.1072936{col 76}{space 3} .2568711
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-1.202331{col 35}{space 2} .1961949{col 46}{space 1}   -6.13{col 55}{space 3}0.000{col 63}{space 4}-1.586866{col 76}{space 3}-.8177963
{txt}{space 16}_cons {c |}{col 23}{res}{space 2}-.7728456{col 35}{space 2} .1523189{col 46}{space 1}   -5.07{col 55}{space 3}0.000{col 63}{space 4}-1.071385{col 76}{space 3}-.4743062
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     2,930
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(stemt), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0050035{col 35}{space 2} .0004623{col 46}{space 1}   10.82{col 55}{space 3}0.000{col 63}{space 4} .0040974{col 76}{space 3} .0059096
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2}  .144102{col 35}{space 2} .0258773{col 46}{space 1}    5.57{col 55}{space 3}0.000{col 63}{space 4} .0933834{col 76}{space 3} .1948205
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0947167{col 35}{space 2} .0236429{col 46}{space 1}    4.01{col 55}{space 3}0.000{col 63}{space 4} .0483774{col 76}{space 3}  .141056
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .2124038{col 35}{space 2} .0234372{col 46}{space 1}    9.06{col 55}{space 3}0.000{col 63}{space 4} .1664678{col 76}{space 3} .2583399
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .2102986{col 35}{space 2} .0297805{col 46}{space 1}    7.06{col 55}{space 3}0.000{col 63}{space 4} .1519299{col 76}{space 3} .2686674
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .0126684{col 35}{space 2} .0157254{col 46}{space 1}    0.81{col 55}{space 3}0.420{col 63}{space 4}-.0181528{col 76}{space 3} .0434896
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.2455316{col 35}{space 2} .0440199{col 46}{space 1}   -5.58{col 55}{space 3}0.000{col 63}{space 4}-.3318089{col 76}{space 3}-.1592542
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q13
{txt}
{com}. logit stemt alder_ved_val i.hfaudd_hovedgruppe i.koen i.IE /// 
> [pweight = weights] if turnout_missing == 0 & deltog == 1 & _mFV == 3 // 2013 turnout, validated 2015

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-629727.69}  
Iteration 1:{space 3}log pseudolikelihood = {res:-585580.36}  
Iteration 2:{space 3}log pseudolikelihood = {res:-582760.43}  
Iteration 3:{space 3}log pseudolikelihood = {res: -582752.6}  
Iteration 4:{space 3}log pseudolikelihood = {res: -582752.6}  
{res}
{txt}Logistic regression{col 49}Number of obs{col 67}= {res}     1,522
{txt}{col 49}Wald chi2({res}7{txt}){col 67}= {res}    103.11
{txt}{col 49}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res} -582752.6{txt}{col 49}Pseudo R2{col 67}= {res}    0.0746

{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}                stemt{col 23}{c |}      Coef.{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0364545{col 35}{space 2} .0046701{col 46}{space 1}    7.81{col 55}{space 3}0.000{col 63}{space 4} .0273011{col 76}{space 3} .0456078
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2}  .586721{col 35}{space 2} .2271633{col 46}{space 1}    2.58{col 55}{space 3}0.010{col 63}{space 4} .1414892{col 76}{space 3} 1.031953
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .3549598{col 35}{space 2} .1975032{col 46}{space 1}    1.80{col 55}{space 3}0.072{col 63}{space 4}-.0321393{col 76}{space 3} .7420589
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} 1.101754{col 35}{space 2} .2322632{col 46}{space 1}    4.74{col 55}{space 3}0.000{col 63}{space 4} .6465265{col 76}{space 3} 1.556982
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} 1.129156{col 35}{space 2} .3070317{col 46}{space 1}    3.68{col 55}{space 3}0.000{col 63}{space 4} .5273845{col 76}{space 3} 1.730927
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .0517463{col 35}{space 2}  .148184{col 46}{space 1}    0.35{col 55}{space 3}0.727{col 63}{space 4}-.2386889{col 76}{space 3} .3421815
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.3820731{col 35}{space 2} .3714111{col 46}{space 1}   -1.03{col 55}{space 3}0.304{col 63}{space 4}-1.110026{col 76}{space 3} .3458793
{txt}{space 16}_cons {c |}{col 23}{res}{space 2} -.561833{col 35}{space 2} .2371947{col 46}{space 1}   -2.37{col 55}{space 3}0.018{col 63}{space 4}-1.026726{col 76}{space 3}  -.09694
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. margins, dydx(*) post
{res}
{txt}Average marginal effects{col 49}Number of obs{col 67}= {res}     1,522
{txt}Model VCE{col 14}: {res}Robust

{txt}{p2colset 1 14 16 2}{...}
{p2col:Expression}:{space 1}{res:Pr(stemt), predict()}{p_end}
{p2colreset}{...}
{txt}{p2colset 1 14 16 2}{...}
{p2col:dy/dx w.r.t.}:{space 1}{res:alder_ved_valg 2.hfaudd_hovedgruppe 3.hfaudd_hovedgruppe 4.hfaudd_hovedgruppe 5.hfaudd_hovedgruppe 2.koen 2.IE_TYPE}{p_end}
{p2colreset}{...}

{res}{txt}{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35} Delta-method
{col 23}{c |}      dy/dx{col 35}   Std. Err.{col 47}      z{col 55}   P>|z|{col 63}     [95% Con{col 76}f. Interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}alder_ved_valg {c |}{col 23}{res}{space 2} .0045349{col 35}{space 2} .0005417{col 46}{space 1}    8.37{col 55}{space 3}0.000{col 63}{space 4} .0034731{col 76}{space 3} .0055966
{txt}{space 21} {c |}
{space 3}hfaudd_hovedgruppe {c |}
Gymnasial uddannelse  {c |}{col 23}{res}{space 2} .0869854{col 35}{space 2} .0328252{col 46}{space 1}    2.65{col 55}{space 3}0.008{col 63}{space 4} .0226492{col 76}{space 3} .1513216
{txt}{space 3}Faglig uddannelse  {c |}{col 23}{res}{space 2} .0559763{col 35}{space 2} .0318247{col 46}{space 1}    1.76{col 55}{space 3}0.079{col 63}{space 4} -.006399{col 76}{space 3} .1183517
{txt}Kort- og mellemlan..  {c |}{col 23}{res}{space 2} .1411435{col 35}{space 2} .0299075{col 46}{space 1}    4.72{col 55}{space 3}0.000{col 63}{space 4}  .082526{col 76}{space 3} .1997611
{txt}Lang videregående ..  {c |}{col 23}{res}{space 2} .1435024{col 35}{space 2} .0342175{col 46}{space 1}    4.19{col 55}{space 3}0.000{col 63}{space 4} .0764373{col 76}{space 3} .2105675
{txt}{space 21} {c |}
{space 17}koen {c |}
{space 14}Kvinde  {c |}{col 23}{res}{space 2} .0064349{col 35}{space 2} .0184111{col 46}{space 1}    0.35{col 55}{space 3}0.727{col 63}{space 4}-.0296501{col 76}{space 3}   .04252
{txt}{space 21} {c |}
{space 14}IE_TYPE {c |}
{space 9}Indvandrere  {c |}{col 23}{res}{space 2}-.0527115{col 35}{space 2} .0562986{col 46}{space 1}   -0.94{col 55}{space 3}0.349{col 63}{space 4}-.1630548{col 76}{space 3} .0576318
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 87}Note: dy/dx for factor levels is the discrete change from the base level.{txt}{p_end}
{res}{txt}
{com}. estimates store q14
{txt}
{com}. 
. esttab q11 q12 q13 q14 using res/figures2_data.txt, ///
> replace b(a4) se(a4) nostar nogaps  nobase nopar nolines nonum noobs nonotes
{res}{txt}(output written to {browse  `"res/figures2_data.txt"'})

{com}. 
. timer off 1 
{txt}
{com}. timer list 1
{res}   1:   1937.60 /        2 =     968.7990
{txt}
{com}. capture log close
{smcl}
{com}{sf}{ul off}